<?php
$this->pageTitle = Yii::app()->name . ' - Suspicious Email';
?>
<h1>Report Negative Comments</h1>
<?php if (Yii::app()->user->hasFlash('negativeComment')): ?>
    <div class="flash-success">
        <?php echo Yii::app()->user->getFlash('negativeComment'); ?>
    </div>
<?php else: ?>
    
<p class="info" style="font-style: italic">
        If you find out any Negative Comments about JustGetDouble, Please let us know by filling up the information. Informants’ identity will be in disguise. Criticism will make us to improve ourselves. So we want to hear what kind of bad others are saying.
    </p>
    <div class="form">
        <?php
        $form = $this->beginWidget('CActiveForm', array(
            'id' => 'negativeCommentForm-form',
            'enableClientValidation' => true,
            'clientOptions' => array(
                'validateOnSubmit' => true,
            ),
        ));
        ?>
        <?php echo $form->errorSummary($model); ?>
        <div class="row">
            <?php echo $form->labelEx($model, 'informantname'); ?>
            <?php echo $form->textField($model, 'informantname'); ?>
            <?php echo $form->error($model, 'informantname'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'comments'); ?>
            <?php echo $form->textArea($model, 'comments'); ?>
            <?php echo $form->error($model, 'comments'); ?>
        </div>
        
        <div class="row">
            <?php echo $form->labelEx($model, 'source'); ?>
            <?php echo $form->textField($model, 'source'); ?>
            <?php echo $form->error($model, 'source'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'date'); ?>
            <?php //echo $form->textField($model, 'senddate'); ?>
            <?php
            $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                'options' => array(
                    'dateFormat' => "yy-mm-dd",
                ),
                'model' => $model,
                'attribute' => 'date',
                'htmlOptions' => array(
                    'size' => '10', // textField size
                    'maxlength' => '10', // textField maxlength
                ),
            ));
            ?>
            <?php echo $form->error($model, 'date'); ?>
        </div>
        
        <div class="row">
            <?php echo $form->labelEx($model, 'country'); ?>
            <?php echo $form->textField($model, 'country'); ?>
            <?php echo $form->error($model, 'country'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'suggestion'); ?>
            <?php echo $form->textArea($model, 'suggestion'); ?>
            <?php echo $form->error($model, 'suggestion'); ?>
        </div>

        <?php if (CCaptcha::checkRequirements()): ?>
            <div class="row captcha">
                <?php echo $form->labelEx($model, 'verifyCode'); ?>
                <div>
                    <?php $this->widget('CCaptcha'); ?>
                    <?php echo $form->textField($model, 'verifyCode'); ?>
                </div>
                <div class="hint">Please enter the letters as they are shown in the image above.
                    <br/>Letters are not case-sensitive.</div>
                <?php echo $form->error($model, 'verifyCode'); ?>
            </div>
        <?php endif; ?>
        <p class="note"><span class="required">*</span> (Asterisk) denotes required fields which therefore must not be left empty.</p>
        <div class="row buttons">
            <?php echo CHtml::submitButton('Submit'); ?>
        </div>
        <?php $this->endWidget(); ?>
    </div>
<?php endif; ?>